package com.proxy.cglib;

import net.sf.cglib.beans.BeanCopier;

public class BeanCopierDemo {

	public static void main(String[] args) {
		BeanCopier copier = BeanCopier.create(SampleBean.class, OtherSampleBean.class, false);//设置为true，则使用converter
	    SampleBean myBean = new SampleBean();
	    myBean.setValue("Hello cglib");
	    OtherSampleBean otherBean = new OtherSampleBean();
	    copier.copy(myBean, otherBean, null); //设置为true，则传入converter指明怎么进行转换
	   	System.out.println(otherBean.getValue());
	}

}
